/**
 * @author wangxiaowei

 */
var sort = null;
var grid = null;
function initlist(){
var colModel = new Ext.grid.ColumnModel([
		{header:'文号',dataIndex:'wenhaotype',menuDisabled : true},
		{header:'发文时间',dataIndex:'fawendatetime',menuDisabled : true,width: 50},
		{header:'主送',dataIndex:'zhusong',menuDisabled : true},		
		{header:'标题',dataIndex:'biaoti',menuDisabled : true},
		{header:'拟稿人',dataIndex:'nigaorenname',menuDisabled : true,width: 35},		
		{header:'份数',dataIndex:'fenshu',menuDisabled : true,width: 35}
	]);
	var url = Ext.get('url').getValue();
	sort = new Ext.data.JsonStore({
		url:url,
		fields:['biaoti','nigaorenname','zhusong','wenhaotype','fenshu','fawendatetime'],
		root:'root',
		totalProperty:'totalProperty'
	});
	 grid = new Ext.grid.GridPanel({
		title:'党委发文登记薄查询记录',
		cm:colModel,
		renderTo:'topic-grid',
		store:sort,
		loadMask:true,
		autoHeight:true,
	    viewConfig:{
	    	forceFit: true
	    },
	    loadMask:{ 
		msg : '数据加载中，请稍后...' 
		}, 
	    stripeRows:true,
	    width: Ext.get("topic-grid").getWidth(),
	    height:Ext.get("topic-grid").getHeight(),
	    tbar: new Ext.Toolbar({
         items: [
           {
               id: 'buttonA',
		       iconCls: 'daohang',
               text: "返回",
               handler: function() {
					window.history.go(-1);
               }
			}]
		})
	});
	sort.load();
}